home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / hobbes3 / palettes.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-20  |  1.1 KB  |  32 lines

  1. /**************************************************************************
  2.  * PALETTE.C
  3.  *
  4.  * Set VGA RGB palette
  5.  *************************************************************************/
  6.  
  7. #include "hobbes.h"
  8.  
  9. void VGA_fadein(WORD count, BYTE far *p1, BYTE far *p2);
  10. void VGA_fadeout(WORD count, BYTE far *p1, BYTE far *p2);
  11.  
  12.  
  13. /*********************************************************************
  14.  * Fade colors from the given palette into black using 'count' steps.
  15.  * The given 'palette' array is not modified.
  16.  ********************************************************************/
  17. void FadeOut(int count, COLOR palette[256][3])
  18. {
  19.     BYTE temp_pal[3*256];
  20.     VGA_fadeout(count,palette,temp_pal);
  21. }
  22.  
  23. /*********************************************************************
  24.  * Fade colors from black to the given palette using 'count' steps.
  25.  * The given 'palette' array is not modified.
  26.  ********************************************************************/
  27. void FadeIn(int count, COLOR palette[256][3])
  28. {
  29.     BYTE temp_pal[3*256];
  30.     VGA_fadein(count,palette,temp_pal);
  31. }
  32.